package VN.EDU.IMIC.DEVELOPER.VUVANLUANLEVEL2.EXAM0102;

public class StudentModles implements IMICIterface {
StudentEntity ObjStudent = new StudentEntity();
StudentEntity ObjStudent1 = new StudentEntity();

	@Override
	public String PrintStudentInfo(Object ObjStudent) {

		return "My fullname is : " + ((StudentEntity) ObjStudent).getFullname() + " has rollno : " + ((StudentEntity) ObjStudent).getRollNo() + " sex : " + ((StudentEntity) ObjStudent).getSex() + " email : " + ((StudentEntity) ObjStudent).getEmail() + 
				" mobile : " + ((StudentEntity) ObjStudent).getMobile() + " address : " + ((StudentEntity) ObjStudent).getAddress() + " marks : " + ((StudentEntity) ObjStudent).getMarks();
	}

	@Override
	public String CheckMarks(Object ObjStudent){ 
		String result ="####";
		if(((StudentEntity) ObjStudent).getMarks()>=9){result =" Gioi ";}
		else{if(((StudentEntity) ObjStudent).getMarks()>=7.5){result =" Kha ";}
		else{if(((StudentEntity) ObjStudent).getMarks()>=5){result =" Trung Binh ";}
		else{result = " Yeu ";}}}
		return result;
	}

	@Override
	public boolean CompareTo(Object ObjStudent, Object ObjStudent1) {
boolean result = true;
if(((StudentEntity) ObjStudent).getMarks() == ((StudentEntity) ObjStudent1).getMarks()){result = true;}
else {result = false;}
		return result;
	}

}
